<template>
  <div class="content_box">
    <div class="list_box">
      <div class="box" @click="goLink">
        <p>用户协议</p>
        <van-icon color="#999" class="icon" name="arrow"/>
      </div>
      <div class="box" @click="toXieyi">
        <p>充值协议</p>
        <van-icon color="#999" class="icon" name="arrow"/>
      </div>
      <div class="box">
        <p>企业资质</p>
        <van-icon color="#999" class="icon" name="arrow"/>
      </div>
      <div class="box" v-if="roles.length" @click="toStoreAdmin">
        <p>店铺管理</p>
        <van-icon color="#999" class="icon" name="arrow"/>
      </div>
      <div class="box">
        <p>关于应许之地</p>
        <p style="color:#999">v2.0.1.1</p>
      </div>
    </div>
  </div>
</template>

<script>
import {
    getRoles
} from '@/utils/auth'
import { Debounce } from "@/utils/index";
export default {
  data() {
    return {
      roles:getRoles()
    };
  },
  methods: {

    // 跳转店铺管理
    toStoreAdmin(){
      wx.navigateTo({
          url: `/pages/staffPages/roomAdmin/main`,
      });
    },

    // 充值协议
    toXieyi(){
      wx.navigateTo({
          url: `/pages/myPages/recharge_xieyi/main`,
      });
    },

    // 跳转使用协议
    goLink(){
      wx.navigateTo({
          url: '/pages/protocol/main',
        });
    },
  },
  onLoad(options){
  },
  onShow() {
    console.log(this.roles)
  },
};
</script>

<style lang="scss" scoped>
.content_box{
  width: 100%;
  height: 100vh;
  background: #F5F5F5;
  padding-top:30rpx;
  .list_box{
    width: 92%;
    background: #fff;
    border-radius: 16rpx;
    margin:0 auto;
    .box{
      padding:0 30rpx 0 10rpx;
      border-bottom:1px solid #F2F1F4;
      height: 100rpx;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 30rpx;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #111111;
      margin-left:30rpx;
      &:last-child{
        border-bottom:none;
      }
    }
  }
}
</style>